<template>
  <div id="IdeaDate">
    <div class="homeModule-title">
      <p>观念日历</p>
      <div>
        <p @click="MoreBtn(IdeaDate.date)">更多</p>
        <van-icon name="arrow" />
      </div>
    </div>
    <div
      class="DateContent"
      @click="GoSingleSetView(IdeaDate.article_id, IdeaDate.content_id)"
    >
      <!-- 上 -->
      <div class="DateContent-top">
        <p>{{ IdeaDate.title }}</p>
        <p>{{ IdeaDate.date_txt }} | {{ IdeaDate.date_week_cn }}</p>
      </div>
      <!-- 中 -->
      <div class="DateContent-mid">
        {{ IdeaDate.desc }}
      </div>
      <!-- 下 -->
      <div class="DateContent-bot">
        <img :src="IdeaDate.background_img" alt="" />
        <div>
          <p>{{ IdeaDate.article_title }}</p>
          <span>{{ IdeaDate.author }} · </span>
          <span>{{ IdeaDate.content_title }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "IdeaDate",
  props: ["IdeaDate"],
  mounted() {
    this.$nextTick(() => {
      // console.log(11);
      // console.log(this?.IdeaDate);
    });
  },
  methods: {
    // 更多的按钮
    MoreBtn(date) {
      console.log("11", this.IdeaDate);
      this.$router.push({
        path: "/IdeaDateView",
        query: {
          date,
        },
      });
    },
    // 内容点击跳转到节目单集
    GoSingleSetView(article_id, content_id) {
      this.$router.push({
        path: "/SingleSetView",
        query: {
          article_id,
          content_id,
        },
      });
    },
  },
};
</script>

<style lang="scss" scoped>
#IdeaDate {
  margin: 0.625rem 0;

  .DateContent {
    // width: 100%;
    // height: 11.625rem;
    background-color: white;
    box-shadow: var(--boxsizi);
    border-radius: 0.25rem;
    padding: 0.875rem;
    box-sizing: border-box;
    .DateContent-top {
      font-size: 0.8125rem;
      color: #2e4e6f;
      display: flex;
      justify-content: space-between;
      margin: 0.625rem 0;
    }
    .DateContent-mid {
      font-size: 0.8125rem;
      color: #424e60;
      margin: 0.625rem 0;
      line-height: 1.0625rem;
    }
    .DateContent-bot {
      display: flex;
      font-size: 0.8125rem;
      align-items: center;
      margin-top: 1.25rem;
      img {
        width: 4.125rem;
        height: 4.125rem;
      }
      div {
        padding: 0.625rem;
        background-color: #f7fafc;
        overflow: hidden;
        p {
          line-height: 1.125rem;
        }
        span {
          color: var(--fontcolor);
          font-size: 0.75rem;
          line-height: 1rem;
        }
      }
    }
  }
}
</style>